package com.fdd.op.sdk.internal.util;

import java.util.HashMap;
import java.util.Map;

/**
 * API请求参数容器
 *
 * @author Fadada
 * @date 2021/04/26
 */
public class RequestParametersHolder {

	private String requestUrl;
	private String responseBody;
	private byte[] responseBytes;

	private FddHashMap protocalMustParams;
	private FddHashMap protocalOptParams;
	private FddHashMap applicationParams;

	public String getRequestUrl() {
		return this.requestUrl;
	}

	public void setRequestUrl(String requestUrl) {
		this.requestUrl = requestUrl;
	}

	public String getResponseBody() {
		return this.responseBody;
	}

	public void setResponseBody(String responseBody) {
		this.responseBody = responseBody;
	}

	public FddHashMap getProtocalMustParams() {
		return this.protocalMustParams;
	}

	public void setProtocalMustParams(FddHashMap protocalMustParams) {
		this.protocalMustParams = protocalMustParams;
	}

	public FddHashMap getProtocalOptParams() {
		return this.protocalOptParams;
	}

	public void setProtocalOptParams(FddHashMap protocalOptParams) {
		this.protocalOptParams = protocalOptParams;
	}

	public FddHashMap getApplicationParams() {
		return this.applicationParams;
	}

	public void setApplicationParams(FddHashMap applicationParams) {
		this.applicationParams = applicationParams;
	}

	public Map<String, Object> getAllParams() {
		Map<String, Object> params = new HashMap<String, Object>();
		if (protocalMustParams != null && !protocalMustParams.isEmpty()) {
			params.putAll(protocalMustParams);
		}
		if (protocalOptParams != null && !protocalOptParams.isEmpty()) {
			params.putAll(protocalOptParams);
		}
		if (applicationParams != null && !applicationParams.isEmpty()) {
			params.putAll(applicationParams);
		}
		return params;
	}

	public byte[] getResponseBytes() {
		return responseBytes;
	}

	public void setResponseBytes(byte[] responseBytes) {
		this.responseBytes = responseBytes;
	}
}
